home *** CD-ROM | disk | FTP | other *** search
- ELF_GETIDENT(3E) Last changed: 10-13-98
-
-
- NNAAMMEE
- eellff__ggeettiiddeenntt - Retrieves file identification data
-
- SSYYNNOOPPSSIISS
- cccc [_f_l_a_g ...] _f_i_l_e ... --lleellff [_l_i_b_r_a_r_y ...]
-
- ##iinncclluuddee <<lliibbeellff..hh>>
-
- cchhaarr **eellff__ggeettiiddeenntt((EEllff **eellff,, ssiizzee__tt **ppttrr));;
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- ELF provides a framework for various classes of files, where basic
- objects may have 32 bits, 64 bits, etc. To accommodate these
- differences without forcing the larger sizes on smaller machines, the
- initial bytes in an ELF file hold identification information common to
- all file classes. Every ELF header's ee__iiddeenntt has EEII__NNIIDDEENNTT bytes with
- the following interpretation:
-
- --------------------------------------------------------------------------
- ee__iiddeenntt Index Value Purpose
- --------------------------------------------------------------------------
- EI_MAG0 ELFMAG0 File identification
- EI_MAG1 ELFMAG1
- EI_MAG2 ELFMAG2
- EI_MAG3 ELFMAG3
- EI_CLASS ELFCLASSNONE File class
- ELFCLASS32
- ELFCLASS64
- EI_DATA ELFDATANONE Data encoding
- ELFDATA2LSB
- ELFDATA2MSB
- EI_VERSION EV_CURRENT File version
- 7-15 0 Unused, set to zero
- --------------------------------------------------------------------------
-
- Other kinds of files [see eellff__kkiinndd(3E)] also may have identification
- data, though they would not conform to ee__iiddeenntt.
-
- eellff__ggeettiiddeenntt returns a pointer to the file's initial bytes. If the
- library recognizes the file, a conversion from the file image to the
- memory image may occur. In any case, the identification bytes are
- guaranteed to not have been modified, though the size of the
- unmodified area depends on the file type. If ppttrr is non-null, the
- library stores the number of identification bytes in the location to
- which ppttrr points. If no data are present, eellff is null, or an error
- occurs, the return value is a null pointer, with zero optionally
- stored through ppttrr.
-
- SSEEEE AALLSSOO
- eellff(3E), eellff__bbeeggiinn(3E), eellff__ggeetteehhddrr(3E), eellff__kkiinndd(3E), eellff__rraawwffiillee(3E)
-
- This man page is available only online.
-
-